<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<include file="_layout/mall.head.html" />
<literal>
<style>
body{font-size:14px;background:#2c1357 url(__CDN__/upload/coupon/57d50c6c6c799/bg.jpg) repeat-x fixed top;background-size:100%}
.coupon-title{text-align:center;margin:30px 0 0 0}
.coupon-title img{width:80%}
.thanks{font-size:14px;color:#fff;line-height:20px;margin:-35px auto 10px auto;width: 260px}
.gold{color:#edb40a}
.thanks .gold{font-weight:bold;font-size:14px}
.c-item{margin:30px 5px 30px 7px;-webkit-animation-name:shineRed;-webkit-animation-duration:3s;-webkit-animation-iteration-count:infinite}
.c-item img{width:100%}
.c-notice{}
.c-title{background:url(__CDN__/upload/coupon/57d50c6c6c799/bg_title.png) repeat-x;background-size:100% 60px;height:60px;text-align:center;line-height:60px;color:#fff}
.c-notice .c-content{color:#fff;line-height:18px;list-style-type:decimal;padding-left:30px}
.shine_red .btn{width:100%;height:100%;border-radius:50%;padding-top:30px}
@-webkit-keyframes shineRed{from{-webkit-box-shadow:0 0 0 #fff}
25%{-webkit-box-shadow:0 0 80px #fff}
50%{-webkit-box-shadow:0 0 30px #fff}
75%{-webkit-box-shadow:0 0 80px #fff}
to{-webkit-box-shadow:0 0 0 #fff}
}.c-footer{}
.c-footer .nav-menu-1{border-top:1px solid #2d1259;background:no-repeat #33135c}
.c-footer .nav-menu-1 .nav-item+.nav-item{border-left:1px solid #2d1259}
.c-footer .nav-menu-1 a{color:#fff}
.c-footer .home{background-color:#33135c;background-blend-mode:screen,overlay}
.copyright .ft-links>a{margin:0 6px;color:#fff}
.footer{background-color:transparent}
.more-service{text-align:center;line-height:20px;color:#d64a8c;font-weight:bold}
.more-service img{margin-left:-15px}
</style>
</literal>
</head>
<body class="body-fixed-bottom">
	<div class="container">
		<div class="content">
			<div class="coupon-title">
			 	<img src="__CDN__/upload/coupon/57d50c6c6c799/top.png">
			</div>
			<div class="thanks">
			     至此中秋佳节来到之际，<br>
			     为感谢新老会员在平台组建期间<br>
			     给予的支持、理解和包容，<br>
			     即日起，<br>
		      <span class="gold">所有人可免费领取价值 50元 的优惠券。</span>
			</div>
			<div class="js-coupons c-item clearfix">
				<img src="__CDN__/upload/coupon/57d50c6c6c799/coupon.png">
			</div>
			<div class="more-service">
			   <img src="__CDN__/upload/coupon/57d50c6c6c799/hehua.png">
			   <p>我们已经准备好了：</p>
			   <p>更好的产品，更好的服务！</p>
			   <p>期待您的光临！</p>
			</div>
			<div class="c-notice">
				<h2 class="c-title">优惠券说明</h2>
				<ul class="c-content">
					<li>每个账户最多可领{$coupon.quota}张，默认一次全领取</li>
                    <li>每张优惠券优惠{:floatval($coupon['value'])}元，累计优惠{$coupon['value']*$coupon['quota']}元整</li>
                    <li>仅用于直营店，并不可和其他优惠一起使用</li>
                    <li>订单满{$coupon['meet']}元自动使用，下单即作废，交易失败优惠券不退回，请珍惜使用</li>
                    <li>活动有效期截止{:date('Y年m月d日', $coupon['end_time'])}止</li>
                    <li>优惠券数量有限，先领先得</li>
                    <li><a href="/h5/coupon" class="gold">点击这里查看优惠券使用情况</a></li>
				</ul>
			</div>
			<if condition="$member['subscribe'] eq 0">
			<h2 class="c-title">关注我们</h2>
			<div style="text-align:center">
				<img src="{$qrcode}" style="width:70%">
			</div>
			</if>
            <div class="js-hot-goods">
                <h2 class="c-title">商城热卖</h2>
                <ul class="sc-goods-list pic clearfix size-2">
                    <foreach name="hotList" item="goods">
                    <li class="js-goods-card goods-card card small-pic" data-id="{$goods.id}">
                        <a href="/h5/goods?id={$goods.id}" class="link">
                            <div class="photo-block"><img class="goods-photo" src="{$goods.pic_url}"></div>
                            <div class="info clearfix info-price">
                                <p class="goods-title">{$goods.title}</p>
                                <div class="goods-price">
                                    <p> 会员价：<span class="price_prefix">¥</span><em>{$goods.agent3_price}</em></p>
                                    <p> 零售价：<span class="price_prefix">¥</span><em>{$goods.price}</em></p>
                                </div>
                            </div>
                            <div class="goods-buy btn1 info-title"></div>
                            <div class="js-goods-buy buy-response" data-id="{$goods.id}"></div>
                       </a>
                    </li>
                    </foreach>
				</ul>
            </div>
			<div>
				<h2 class="c-title">精品推荐</h2>
				<ul class="js-goods-list sc-goods-list pic clearfix size-2"></ul>
			</div>
		</div>
        <include file="_layout/mall.copyright.html" />
	</div>
	<div class="c-footer">
		<include file="_layout/mall.footer.html" />
	</div>
	<script>
	require(['jquery'], function(){
        var $btn = $('.js-coupons');
        $btn.on('click', function(){
        	<if condition="$coupon['errcode'] neq 0">
        	alert("{$coupon['errmsg']}");
        	<else/>
        	if($btn.data('received')){
                alert('已领取成功');
                return false;
            }
            $.ajax({
                url: '__ACTION__',
                type: 'post',
                dataType: 'json',
                waitting: '领取中',
                success: function(){
                	alert('领取成功');
                    $btn.data('received', 1);
                }
            });
        	</if>
			return false;
		});
	});
	
	require(['skumodal'], function(ShoppingCart){
        $('.js-hot-goods .js-goods-buy').on('click',function(){
            var animate = this.previousElementSibling;
            if(animate.classList.contains('ajax-loading')){
                return false;
            }
            
            var $btn = $(this);
            var goods_id = $btn.data('id');
            
            new ShoppingCart({
                id: goods_id,
                buttons:{'buyNow': '立即下单', 'addCart': '加入购物车'},
                loading: function(loading){
                    if(loading){
                        animate.classList.add('ajax-loading');
                    }else{
                        animate.classList.remove('ajax-loading');
                    }
                },
                onCart: function(product){
                     // 自定义处理，请返回false。否则将自动加入购物车
                },
                onBuy: function(product){
                    // 自定义处理，请返回false。否则将自动进入后续处理
                }
            });
            
            return false;
        })
    });
	
	require(['goods_list'], function(gv){
        gv.start({
            url: '/h5/mall/like',
            container: '.js-goods-list',
        });
    });
	</script>
</body>
</html>